﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MBBStoreClient
{
    public partial class frmInventoryEncoderName : Form
    {
        string _encoder = "";
        string _officer = "";
        public frmInventoryEncoderName()
        {
            InitializeComponent();
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            DoEvents();
        }

        void DoEvents()
        {
            btnAccept.Click += new EventHandler(delegate
            {
                if (txtEncoder.Text.Length < 1) return;
                if (txtOfficer.Text.Length < 1) return;
                _encoder = txtEncoder.Text;
                _officer = txtOfficer.Text;
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            });
        }

        public string EncoderName
        {
            get { return _encoder; }
        }
        public string OfficerName
        {
            get { return _officer; }
        }
    }
}
